<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <input type="text" placeholder="hahaha">
    <script>
        var input=document.querySelector('input'); 
        console.dir(input); 
        let i=10
        let timer = setInterval(() => {
          
            if(i==0){
                input.disabled = false; 
                clearInterval(timer) 
                return;
            }
                console.log(i) 
            input.disabled = true
            input.value = i 
              i--;
            
           
            
        }, 200);
    </script>
</body>
</html>